﻿using System.Collections.Specialized;

namespace FreeFall
{
    internal class Program
    {
        static void Main(string[] args)
        {
            double height = 100;
            double sum = 0;
            int n = 10;
            for (int i = 1; i <= n; i++)
            {
                sum += height; // 下落距离
                if (i < n)
                {
                    height /= 2.0; // 反弹高度
                    sum += height; // 反弹距离
                }
            }
            double reboundHeight = height / 2.0;
            Console.WriteLine("第10次落地时，共经过 {0} 米", sum);
            Console.WriteLine("第10次反弹高度为 {0} 米", reboundHeight);
        }
    }
}
